#include<iostream>

using namespace std;

int main()
{
    int n;
    cin >>  n;
    while (n--)
    {
        int s, h, w;
        cin >> s >> h >> w;
        if (s == 1)
        {
            if (h > 130) cout << "ni li hai! ";
            else if (h < 130) cout << "duo chi yu! ";
            else cout <<"wan mei! ";
            if (w > 27) cout << "shao chi rou!" << endl;
            else if (w < 27) cout << "duo chi rou!" << endl;
            else cout <<"wan mei!"<< endl;
        }
        else 
        {
            if (h > 129) cout << "ni li hai! ";
            else if (h < 129) cout << "duo chi yu! ";
            else cout <<"wan mei! ";
            if (w > 25) cout << "shao chi rou!" << endl;
            else if (w < 25) cout << "duo chi rou!" << endl;
            else cout <<"wan mei!" << endl;
        }
    }
    return 0;
}